3.118 \(\int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx\)

Optimal. Leaf size=88 \[ -\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^2(c+d x)}{2 b d} \]

[Out]

-(a^2+b^2)*ln(cos(d*x+c))/b^3/d+(a^2+b^2)*ln(a*cos(d*x+c)+b*sin(d*x+c))/b^3/d+1/2*sec(d*x+c)^2/b/d-a*tan(d*x+c
)/b^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3104, 3767, 8, 3102, 3475, 3133} \[ -\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^2(c+d x)}{2 b d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3/(a*Cos[c + d*x] + b*Sin[c + d*x]),x]

[Out]

-(((a^2 + b^2)*Log[Cos[c + d*x]])/(b^3*d)) + ((a^2 + b^2)*Log[a*Cos[c + d*x] + b*Sin[c + d*x]])/(b^3*d) + Sec[
c + d*x]^2/(2*b*d) - (a*Tan[c + d*x])/(b^2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3102

Int[1/(cos[(c_.) + (d_.)*(x_)]*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])), x_Symbol] :>
Dist[1/b, Int[Tan[c + d*x], x], x] + Dist[1/b, Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c
 + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3104

Int[cos[(c_.) + (d_.)*(x_)]^(m_)/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)]), x_Symbol] :>
 -Simp[Cos[c + d*x]^(m + 1)/(b*d*(m + 1)), x] + (-Dist[a/b^2, Int[Cos[c + d*x]^(m + 1), x], x] + Dist[(a^2 + b
^2)/b^2, Int[Cos[c + d*x]^(m + 2)/(a*Cos[c + d*x] + b*Sin[c + d*x]), x], x]) /; FreeQ[{a, b, c, d}, x] && NeQ[
a^2 + b^2, 0] && LtQ[m, -1]

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx &=\frac {\sec ^2(c+d x)}{2 b d}-\frac {a \int \sec ^2(c+d x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^2}\\ &=\frac {\sec ^2(c+d x)}{2 b d}+\frac {\left (a^2+b^2\right ) \int \frac {b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^3}+\frac {\left (a^2+b^2\right ) \int \tan (c+d x) \, dx}{b^3}+\frac {a \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{b^2 d}\\ &=-\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}+\frac {\sec ^2(c+d x)}{2 b d}-\frac {a \tan (c+d x)}{b^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 52, normalized size = 0.59 \[ \frac {\left (a^2+b^2\right ) \log (a+b \tan (c+d x))-a b \tan (c+d x)+\frac {1}{2} b^2 \tan ^2(c+d x)}{b^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3/(a*Cos[c + d*x] + b*Sin[c + d*x]),x]

[Out]

((a^2 + b^2)*Log[a + b*Tan[c + d*x]] - a*b*Tan[c + d*x] + (b^2*Tan[c + d*x]^2)/2)/(b^3*d)

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 117, normalized size = 1.33 \[ \frac {{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b^{2}}{2 \, b^{3} d \cos \left (d x + c\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*((a^2 + b^2)*cos(d*x + c)^2*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - (a^2
 + b^2)*cos(d*x + c)^2*log(cos(d*x + c)^2) - 2*a*b*cos(d*x + c)*sin(d*x + c) + b^2)/(b^3*d*cos(d*x + c)^2)

________________________________________________________________________________________

giac [A]  time = 4.59, size = 54, normalized size = 0.61 \[ \frac {\frac {b \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} + b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/2*((b*tan(d*x + c)^2 - 2*a*tan(d*x + c))/b^2 + 2*(a^2 + b^2)*log(abs(b*tan(d*x + c) + a))/b^3)/d

________________________________________________________________________________________

maple [A]  time = 0.23, size = 72, normalized size = 0.82 \[ \frac {\tan ^{2}\left (d x +c \right )}{2 d b}-\frac {a \tan \left (d x +c \right )}{b^{2} d}+\frac {\ln \left (a +b \tan \left (d x +c \right )\right ) a^{2}}{d \,b^{3}}+\frac {\ln \left (a +b \tan \left (d x +c \right )\right )}{d b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x)

[Out]

1/2/d/b*tan(d*x+c)^2-a*tan(d*x+c)/b^2/d+1/d/b^3*ln(a+b*tan(d*x+c))*a^2+1/d/b*ln(a+b*tan(d*x+c))

________________________________________________________________________________________

maxima [B]  time = 0.60, size = 238, normalized size = 2.70 \[ -\frac {\frac {2 \, {\left (\frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {b \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{b^{2} - \frac {2 \, b^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {b^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {{\left (a^{2} + b^{2}\right )} \log \left (-a - \frac {2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{3}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-(2*(a*sin(d*x + c)/(cos(d*x + c) + 1) - b*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - a*sin(d*x + c)^3/(cos(d*x + c
) + 1)^3)/(b^2 - 2*b^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + b^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) - (a^2 +
 b^2)*log(-a - 2*b*sin(d*x + c)/(cos(d*x + c) + 1) + a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)/b^3 + (a^2 + b^2)*
log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/b^3 + (a^2 + b^2)*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/b^3)/d

________________________________________________________________________________________

mupad [B]  time = 1.50, size = 300, normalized size = 3.41 \[ \frac {2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^3\right )}-\frac {a^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+b^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}}{b^3\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^3*(a*cos(c + d*x) + b*sin(c + d*x))),x)

[Out]

(2*b^2*tan(c/2 + (d*x)/2)^2 + 2*a*b*tan(c/2 + (d*x)/2)^3 - 2*a*b*tan(c/2 + (d*x)/2))/(d*(b^3*tan(c/2 + (d*x)/2
)^4 - 2*b^3*tan(c/2 + (d*x)/2)^2 + b^3)) - (a^2*atan((b^2*tan(c/2 + (d*x)/2)^2*1i - b^2*1i + a*b*tan(c/2 + (d*
x)/2)*2i)/(2*a^2 - b^2*tan(c/2 + (d*x)/2)^2 - 2*a^2*tan(c/2 + (d*x)/2)^2 + b^2 + 2*a*b*tan(c/2 + (d*x)/2)))*2i
 + b^2*atan((b^2*tan(c/2 + (d*x)/2)^2*1i - b^2*1i + a*b*tan(c/2 + (d*x)/2)*2i)/(2*a^2 - b^2*tan(c/2 + (d*x)/2)
^2 - 2*a^2*tan(c/2 + (d*x)/2)^2 + b^2 + 2*a*b*tan(c/2 + (d*x)/2)))*2i)/(b^3*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{3}{\left (c + d x \right )}}{a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3/(a*cos(d*x+c)+b*sin(d*x+c)),x)

[Out]

Integral(sec(c + d*x)**3/(a*cos(c + d*x) + b*sin(c + d*x)), x)

________________________________________________________________________________________